import request from '@/utils/request';
import {AxiosPromise} from 'axios';
import {RepoCompQueryParam, RepoCompScriptVersionPageResult,} from './types';

export function listRepoCompVersionEntityPages(queryParams: RepoCompQueryParam): AxiosPromise<RepoCompScriptVersionPageResult> {
    return request({
        url: '/manager/repository/component/script/version/page',
        method: 'post',
        data: queryParams,
    });
}

export function getRepoCompOperateEntity(versionId: string, operateId: string) {
    return request({
        url: '/manager/repository/component/script/version/operate/entity',
        method: 'post',
        data: {
            versionId: versionId,
            operateId: operateId
        },
    });
}
